package ace.module.upms.core.impl.controller.rest.rpc;

import ace.cmp.rest.spring.data.jdbc.querydsl.core.controller.sdk.AbstractSdkRestController;
import ace.cmp.security.oauth2.resource.server.core.annotation.PreAuthorizeIsInternalClient;
import ace.module.upms.api.UpmsApplicationApi;
import ace.module.upms.api.model.dto.UpmsApplicationDto;
import ace.module.upms.core.impl.dao.entity.UpmsApplication;
import ace.module.upms.sdk.core.feign.impl.UpmsApplicationFeign;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.experimental.Delegate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 权限应用 rpc controller.
 *
 * @author caspar
 */
@Tag(name = "权限应用-RPC-API")
@PreAuthorizeIsInternalClient
@AllArgsConstructor
@RestController
@RequestMapping(UpmsApplicationFeign.PATH)
@Valid
public class UpmsApplicationRpcController
    extends AbstractSdkRestController<UpmsApplication, Long, UpmsApplicationDto>
    implements UpmsApplicationFeign {

  @Delegate
  private final UpmsApplicationApi upmsApplicationApi;
}
